#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int a, b;
	scanf("%d %d", &a, &b);//0 1
	a = a ^ b;//a=0^1=0
	b = a ^ b;//b=0^1=0
	a = a ^ b;//a=0^0=1
	printf("%d %d\n", a, b);
	return 0;
}